<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"> 

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title>Inicial</title>
        <link href="br.css/style.css" rel="stylesheet" type="text/css" media="screen" />

    </h:head>

    <h:body>        
        <h:form>
            <div id="corpoSite">

                <div id="cabecalho">
                    <img src="img/Logo.jpg" style="width: 400px; height: 100px; padding-top: 10px;" />
                </div>
                <div id="menu">

                </div> 
                <div id="content">
                    <div id="firstHeading">

                    </div>

                    <div class="mapa">
                        <br />
                        <p:breadCrumb preview="true" expandEffectDuration="200" previewWidth="100">
                            <p:menuitem value="Index" action="index.xhtml" ajax="false" />
                            <p:menuitem value="Administrador" url="administrador_index.xhtml" />
                            <p:menuitem value="Manter Fornecedores" url="administrador_manter_fornecedores.xhtml" />
                        </p:breadCrumb>
                    </div>
                    <hr />
                    <div id="conteudo">


                                <p:dataTable var="forn" value="#{rFacesFornecedor.listaFornecedores}" id="fornecedor" >  

                                    <p:column>  
                                        <f:facet name="header">  
                                            <h:outputText value="Codigo" />  
                                        </f:facet>  
                                        <h:outputText value="#{forn.codigoforn}" />  
                                        <c:set value="#{forn.codigoforn}" var="codForn" /> 
                                    </p:column>

                                    <p:column>  
                                        <f:facet name="header">  
                                            <h:outputText value="Responsavel" />  
                                        </f:facet>  
                                        <h:outputText value="#{forn.responsavel}" />  
                                        <c:set value="#{forn.responsavel}" var="respCli" /> 
                                    </p:column>

                                    <p:column>  
                                        <f:facet name="header">  
                                            <h:outputText value="Nome Fantasia" />  
                                        </f:facet>  
                                        <h:outputText value="#{forn.fantasia}" />  
                                        <c:set value="#{forn.fantasia}" var="fantCli" /> 
                                    </p:column> 

                                    <p:column>
                                            <f:facet name="header">  
                                                <h:outputText value="Editar" />
                                            </f:facet>
                                            <p:commandButton ajax="false" value="Alterar" action="#{rFacesFornecedor.adminAlterarCadastro()}" > 
                                                <f:param value="#{forn.codigoforn}" name="codForn" />
                                            </p:commandButton>   
                                    </p:column>
                                    
                                    <p:column>
                                            <f:facet name="header">  
                                                <h:outputText value="Excluir" />
                                            </f:facet>
                                            <p:commandButton ajax="false" value="Excluir" action="#{rFacesFornecedor.remover()}" > 
                                                <f:param value="#{forn.codigoforn}" name="codForn" />
                                            </p:commandButton>   
                                    </p:column>

                                </p:dataTable>  

                    </div>
                    <div id="footer">
                        <hr />
                        <div class="left">
                            Novembro 2011. All rights reserved.<br />Referência: <a href="http://http://localhost:8080/wabt/" target="_blank">WabT</a>            
                        </div>
                        <div class="right">
                            Trabalho final de Projeto Integrador e Modelagem Web
                        </div>
                    </div>
                    <div class="right"></div>
                </div>
            </div>

        </h:form>
    </h:body>
</html>

